package cn.hyl.design.factory;

/**
 * SimpleFactory
 *
 * @author hyl
 * @date 2025-06-09
 */
public class SimpleFactory {
    public Exception getException(String type) {
        switch (type) {
            case "A":
                return new RuntimeException();
            case "B":
                return new ArithmeticException();
        }
        return null;
    }
}
